#ifdef WIN32
#include <windows.h>
#endif

#include <cstdlib>
#include <GL/gl.h>
#include "tankmissile.h"

using namespace bend2d;

void TankMissile::Draw()
{
     glPushMatrix();
     glPointSize(4.0);

     glBegin(GL_POINTS);
       glColor3d(m_MissileColor.GetRedFloat(), m_MissileColor.GetGreenFloat(), m_MissileColor.GetBlueFloat());
       glVertex2d(GetPosition().GetX(), GetPosition().GetY());
     glEnd();

     glPopMatrix();
}

TankMissile::TankMissile(const Point& posistion, TankFireEngine* fireEngine) : 
    Missile(posistion),
    Owner(fireEngine),
    m_MissileColor(0xFF0000FF) 
{
    SetDurableResetter(&m_Reseter);
    SetTimeSense(true, 5);
}

void MissileTravelTime::Reset(FastCast *dataToReset)
{
    //dataToReset->GetWorld()->UnRegistryObject(dataToReset, false);
}
